﻿using System;
using System.Linq.Expressions;

namespace Service.Domain.Conventions
{
    public interface IConvention<T> where T: class
    {
        IConvention<T> WithSqlPrefix(string prefix);

        Expression<Func<T, bool>> ToExpression();

        string ToSql();

        Func<T, bool> ToAction();

        ConventionGroup<T> And(IConvention<T> condition);

        ConventionGroup<T> Or(IConvention<T> condition);
    }
}
